package com.ddd.mill.infrastructure.annotation;



import com.ddd.mill.infrastructure.advice.AccountPatternDataAdvice;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author liu
 * @title: MobilePattern
 * @projectName user-enterprise-center
 * @date 2020/11/2311:28
 */

@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {AccountPatternDataAdvice.class})
public @interface AccountPattern {

    String message() default "账号格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
